//
//  CQNUD.h
//  CQUtils
//
//  Created by runo on 16/5/17.
//  Copyright © 2016年 com.runo. All rights reserved.
//

#import <Foundation/Foundation.h>
//NSUserDefault操作实例
@class UserModel;
@interface CQNUD : NSObject

/**
 *  利用NSUserDefault保存属性
 *
 *  @param object 非空时是保存，nil 时是删除
 *  @param key    键值对
 */
+(void)cqSetObj:(id)object Key:(NSString *)key;

/**
 *  根据key值获取对象
 *
 *  @param key 关键字
 *
 *  @return 获取到的id对象
 */
+(id)cqGetObjForKey:(NSString *)key;
/**写int值到本地*/
+(void)cqWriteInt:(NSInteger )value Key:(NSString *)key;
/**写boo值到本地*/
+(void)cqWriteBool:(BOOL)value Key:(NSString *)key;
/**从本地读int值*/
+(NSInteger)cqReadIntWithKey:(NSString *)key;
/**从本地读bool值*/
+(BOOL)cqReadBoolWithKey:(NSString *)key;

+(void)cqSaveUserInfo:(NSDictionary *)dic;
+(UserModel *)cqGetUserInfo;


@end
